package net.dgg.zz.credential.capitalPoolCount.dao;


import net.dgg.zz.credential.capitalPoolCount.entity.CapitalPoolCount;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 资金池记录（记录证书费用申请通过金额以及证书使用金额）
 */
@Component
public interface CapitalPoolCountDao {
    int deleteByPrimaryKey(Long id);

    int insert(CapitalPoolCount record);

    int insertSelective(CapitalPoolCount record);

    CapitalPoolCount selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CapitalPoolCount record);

    int updateByPrimaryKey(CapitalPoolCount record);

    /**
     * 根据销售子订单查询资金池记录
     *
     * @param businessOrderId 销售子订单id
     * @param isCertificate   是否绑定证书 0-是 1-否
     * @return
     */
    List<CapitalPoolCount> findCountByBusinessOrderId(@Param("businessOrderId") Long businessOrderId,@Param("isCertificate") Integer isCertificate);
}